package com.boomkeeper.archive.config;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

import com.boomkeeper.archive.model.ArchiveDirctory;
import com.boomkeeper.core.config.BaseConfig;

@Configuration("archiveConfig")
public class ArchiveConfig {
	
	@Autowired
	private BaseConfig baseConfig;

	@Bean
	public ArchiveDirctory initArchiveDirctory() {
		ArchiveDirctory archiveDirctory = new ArchiveDirctory();
		
		archiveDirctory.setLteVersionPath(baseConfig.getLteVersion().getLteVersionPath() + "LTE/");
		archiveDirctory.setLteVersionChangeOrderPath(archiveDirctory.getLteVersionPath() + "Change order/");
		archiveDirctory.setLteVersionSchemePath(archiveDirctory.getLteVersionPath() + "Scheme/");
		archiveDirctory.setLteVersionTestReportPath(archiveDirctory.getLteVersionPath() + "Test report/");
		
		archiveDirctory.setAgentVersionPath(baseConfig.getLteVersion().getLteVersionPath() + "Agent/");
		archiveDirctory.setAgentVersionChangeOrderPath(archiveDirctory.getAgentVersionPath() + "Change order/");
		archiveDirctory.setAgentVersionSchemePath(archiveDirctory.getAgentVersionPath() + "Scheme/");
		archiveDirctory.setAgentVersionTestReportPath(archiveDirctory.getAgentVersionPath() + "Test report/");
		
		archiveDirctory.setPubVersionSchemePath(baseConfig.getLteVersion().getLteVersionPath() + "Pub/");
		archiveDirctory.setPubVersionChangeOrderPath(archiveDirctory.getPubVsersionPath() + "Change order/");
		archiveDirctory.setPubVersionSchemePath(archiveDirctory.getPubVsersionPath() + "Scheme/");
		archiveDirctory.setPubVersionTestReportPath(archiveDirctory.getPubVsersionPath() + "Test report/");
		
		return archiveDirctory;
	}
}
